package com.school.sys.fun.action;

import javax.annotation.Resource;

import org.apache.log4j.Logger;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.school.sys.fun.entity.FunServiceImpl;
import com.school.sys.fun.service.Fun;
import com.school.sys.login.entity.Account;
import com.school.sys.login.service.AccountService;

@Controller
@Scope("prototype")
public class FunAction {
	@Resource
	private FunServiceImpl service;
	
	@RequestMapping(value="/persistFun",method=RequestMethod.POST)
	@ResponseBody
	public String FunSave(@ModelAttribute Fun fun){
		return service.Fun_add(fun);
	}
	
	@RequestMapping(value="/delFun",method=RequestMethod.POST)
	@ResponseBody
	public String FunDel(@ModelAttribute Fun fun){
		return service.Fun_del(fun);
	}
}
